home *** CD-ROM | disk | FTP | other *** search
/ SGI Desktop Special Edition 1.1 / SGI Desktop Special Edition 1.1.iso / dist / SoftWindows2.idb / usr / lib / SoftWindows2 / bin / PS.z / PS
Encoding:
Text File  |  1995-11-13  |  887 b   |  39 lines

  1. #!/bin/sh
  2. #
  3. #    Author:        Andrew Guthrie
  4. #    SCCS id:    @(#)PS    1.2 8/1/95
  5. #
  6. #    Copyright Insignia Solutions Inc
  7. #
  8. #    Purpose and use:
  9. # Shell script to strip out the leading CTL-D chars from Postscript
  10. # output from Windows 3.X which stops printing from working. To use
  11. # it set the LPTn port to be a pipe with $SWIN2HOME/bin/PS as the destination.
  12. # This then pipes to lp with the args provided.
  13. #
  14.  
  15. ARGS=$*
  16.  
  17. if test -x $SWIN2HOME/bin/PSfilter
  18. then
  19.     :
  20. else
  21.     echo "PS:  $SWIN2HOME/bin/PSfilter: does not exist or not executable"
  22.     exit 1
  23. fi
  24.  
  25. if test -x /usr/bin/lp
  26. then
  27.     :
  28. else
  29.     echo "PS:  /usr/bin/lp: does not exist or not executable"
  30.     exit 1
  31. fi
  32.  
  33. # Can't check the existence of the printers with lpstat because it doesn't
  34. # return an error code when the destination doesn't exist.
  35.  
  36. #
  37. # Invoke the filter to strip out the CTL-Ds which cause the problem
  38. $SWIN2HOME/bin/PSfilter | /usr/bin/lp $ARGS
  39.